/*
 *  xbox360wireless_headset.h
 *
 *  Created by Delio Brignoli on 11/12/08.
 *  Copyright 2008 Delio Brignoli. All rights reserved.
 *
 */

#include <IOKit/audio/IOAudioDevice.h>
#include "manager.h"

#define WHeadset it_drlinux_driver_XBox360WirelessGamingReceiverHeadset

class WHeadset : public IOAudioDevice
	{
		OSDeclareDefaultStructors(WHeadset)

	private:
		int headsetIdx, outstandingIOCount;
		IOUSBInterface *usbInterface;
		IOUSBPipe *inPipe, *outPipe;
		
		OSString *serviceName;
		WGRManager *managerService;

		void cleanUp(IOService *provider);
		bool willTerminate(IOService * provider, IOOptionBits options);
		bool didTerminate( IOService * provider, IOOptionBits options, bool * defer );

	public:
		virtual bool WHeadset::initHardware(IOService *provider);
		virtual void stop(IOService *provider);
		WGRManager* findManager(int index);
 };
